<template>
  <div>
    <Header :title="title"></Header>
    <div class="title aui-text-center aui-text-3 aui-ftn16 aui-padded-15 aui-padded-b-5" v-text="article.title"></div>
    <div class="aui-text-center aui-text-9 aui-ftn12 aui-padded-b-10" v-text="article.createtime" v-if="article.createtime" v-cloak></div>
    <div class="content aui-padded-10" v-html="article.content"></div>
  </div>
</template>

<script>
  import Header from '../components/header.vue'
  import Notice from '../../service/announce.js'
  export default {
    components: {
      Header
    },
    data() {
      return {
        title: '公告通知',
        article: {content: ''}
      }
    },
    mounted() {
      this.init()
    },
    methods: {
      init: function() {
        if (this.$route.query.type == 1) {
          Notice.fnGetDetail({id: this.$route.params.id}).then(res => {
            if (res && res.status) {
                this.article = res.data;
            }
          })
        } else {
          Notice.fnGetYin().then(res => {
            if (res && res.status) {
              if (this.$route.query.type == 3) {
				  this.article.title = '用户协议'
                  this.article.content = res.data1;
              } else {
				  this.article.title = '隐私政策'
                  this.article.content = res.data;
              }
            }
          })
        }

      }
    }
  }
</script>

<style scoped>
  html, body {
    background-color: #fff!important;
  }
</style>
